Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Chef 13 Deprecation Fix #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

moofish32
Copy link

I am using poise archive in another cookbook and recently turned on deprecations as errors in my Chef 12 environment. I get the following:

          * directory[/opt/consul/0.9.3] action create[2017-10-23T18:42:33+00:00] INFO: Processing directory[/opt/consul/0.9.3] action create (/tmp/kitchen/cache/cookbooks/poise-arch
ive/files/halite_gem/poise_archive/archive_providers/base.rb line 100)
        (up to date)
       [2017-10-23T18:42:33+00:00] ERROR: chef_gem[rubyzip] chef_gem compile_time installation is deprecated. Please set `compile_time false` on the resource to use the new behavior, or
 set `compile_time true` on the resource if compile_time behavior is required. (CHEF-3)/tmp/kitchen/cache/cookbooks/poise-archive/files/halite_gem/poise_archive/archive_providers/zip.rb
:47:in `install_rubyzip'.
       Please see https://docs.chef.io/deprecations_chef_gem_compile_time.html for further details and information on how to correct this problem. at /opt/chef/embedded/lib/ruby/gems/2.
3.0/gems/chef-12.21.20/lib/chef/formatters/doc.rb:419:in `deprecation'

I believe this is tracked back to the chef_gem rubyzip resource which I have updated.

@coderanger
Copy link
Member

Unfortunately that property didn't exist in some Chef versions I support. It would have to either be guarded on a defined? or check a version, and it hasn't seemed worthwhile to go there yet. You can try compile_time(true) if defined?(compile_time) and I think that works given the context, but there is so much method_missing that I've lost track.

@codecov-io
Copy link

codecov-io commented Oct 23, 2017

Codecov Report

Merging #11 into master will decrease coverage by 0.1%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
- Coverage   83.37%   83.27%   -0.11%     
==========================================
  Files          15       15              
  Lines         824      825       +1     
==========================================
  Hits          687      687              
- Misses        137      138       +1
Impacted Files Coverage Δ
lib/poise_archive/archive_providers/zip.rb 28.57% <0%> (-0.7%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32f0626...1807ef7. Read the comment docs.

@tas50
Copy link

tas50 commented May 24, 2018

@coderanger Isn't compile_time a 12.1+ feature which is what this cookbook requires?

@Wing924
Copy link

Wing924 commented Jul 18, 2018

Chef 12 was EOL, it's time to merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants